.\" depot-db.xml(4)
.\"
.\" Copyright (C) 2001-2005, 2010 The Written Word, Inc.
.\"
.\" This program is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 2, or (at your option)
.\" any later version.
.\"
.\" This program is distributed in the hope that it will be useful, but
.\" WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
.\" General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with this program; if not, write to the Free Software Foundation,
.\" Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
.\"
.\" $Id: depot-db.xml.4 705 2010-02-20 21:51:38Z china $
.TH depot-db.xml 4 "2010 February 19"

.SH NAME
depot-db.xml

.SH "FILE FORMAT"
The ``depot\-db.xml'' file contains the names of directories that
should be scanned while \fBsb\fR queries the depot for programs.  The
path ``<dist>'' is prepended to the depot path for all remote depots
and local (file://) depots with a distribution version.  Beginning
from this path, \fBsb\fR reads the ``depot\-db.xml'' file and adds the
path components it specifies to the parent path as another depot to
looking for programs in. By providing successive ``depot\-db.xml''
files in the path, \fBsb\fR is able to descend a directory hierarchy
and search multiple directories for programs.

The DTD for the XML file is as follows:
.nf
.RS 4
.B "<!ELEMENT depots (depot+)>"
.B "<!ELEMENT depot EMPTY>"
.B "<!ATTLIST depot"
.B "  arch          CDATA           #IMPLIED"
.B "  auto-include  CDATA           "1"
.B "  category      CDATA           #IMPLIED"
.B "  dist-ver      CDATA           #IMPLIED"
.B "  name          CDATA           #REQUIRED"
.B "  program       CDATA           #IMPLIED"
.B "  systype       CDATA           #IMPLIED"
.B "  revision      CDATA           #IMPLIED"
.B "  version       CDATA           #IMPLIED>"
.RE
.fi

.SH "DEPOT ATTRIBUTES"
A \fBdepot\fR element can have the following attributes:
.TP 4
.I arch, systype
Architecture type for packages in the directory. Common values are the
GNU system triple such as ``sparc\-sun\-solaris2.8'' or
``alpha\-dec\-osf5.1''. There is no predefined set of update types. As
long as the application understands the type, any name can be used.
\fBarch\fR is deprecated. Use \fBsystype\fR instead.

.TP
.I auto-include
Whether or not the directory should be traversed unless explicitly
requested.

.TP
.I category
Update type. While this can be any value specifying an update type, it
is usually ``src'' to specify a directory containing source code. As
long as the application understands the type, any name can be used.

.TP
.I dist-ver
Distribution version. There is no predefined set of update types. As
long as the application understands the type, any name can be used.
Multiple distribution versions can reference the same directory (as
used in the example below).

.TP
.I name
The directory name to traverse.

.TP
.I program
Program name. Short-circuit to support \-\-oldstyle-dependency option
in gen-sb-db.

.TP
.I version
Program version. Short-circuit to support \-\-oldstyle-dependency
option in gen-sb-db.

.TP
.I revision
Program revision. Short-circuit to support \-\-oldstyle-dependency
option in gen-sb-db.

.SH EXAMPLES
An example of ftp://updates.thewrittenword.com/cd/dists/depot-db.xml:
.nf
.RS 4
<?xml version="1.0"?>
<depots>
  <depot dist-ver="9.0" name="9.0"/>
  <depot dist-ver="8.3" name="8.3"/>
  <depot dist-ver="latest" name="9.0"/>
</depots>
.RE
.fi

An example of ftp://updates.thewrittenword.com/cd/dists/9.0/depot-db.xml:
.nf
.RS 4
<?xml version="1.0"?>
<depots>
  <depot category="packages" name="packages"/>
  <depot category="src" name="src"/>
  <depot category="support" auto-include="0" name="support"/>
  <depot category="test" auto-include="0" name="test"/>
  <depot category="updates" name="updates"/>
</depots>
.RE
.fi

An example of
ftp://updates.thewrittenword.com/cd/dists/9.0/src/depot-db.xml:
.nf
.RS 4
<?xml version="1.0"?>
<depots>
  <depot name="gcc-4.2.4" package="gcc-4.2.4"/>
  <depot name="gnupg-2.0.13" package="gnupg-2.0.13"/>
  <depot name="libpng-1.2.29" package="libpng-1.2.29"/>
</depots>
.RE
.fi

.SH FILES
.TP 20
.I %datadir%/depot-db.dtd
DTD

.SH "SEE ALSO"
.BR sb-db.xml (4),
.BR sb (1)

.SH AUTHOR
\fBThe Written Word\fR <info@thewrittenword.com>
